:root {
  --primary-color: #6c5ce7;
  --secondary-color: #a29bfe;
  --text-color: #2d3436;
  --background-color: #f5f6fa;
  --card-background: #ffffff;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--background-color);
  color: var(--text-color);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.container {
  max-width: 800px;
  width: 100%;
  padding: 2rem;
}

h1 {
  text-align: center;
  margin-bottom: 2rem;
  color: var(--primary-color);
}

.generator-options {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.generator-options > * {
  margin-bottom: 1rem;
}

.btn {
  padding: 1rem 2rem;
  border: none;
  border-radius: 8px;
  background-color: var(--primary-color);
  color: white;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.2s, background-color 0.2s;
}

.btn:hover {
  background-color: var(--secondary-color);
  transform: translateY(-2px);
}

.divider {
  text-align: center;
  font-weight: bold;
  color: var(--text-color);
  opacity: 0.7;
}

.prompt-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

textarea {
  width: 100%;
  height: 100px;
  padding: 1rem;
  border: 2px solid var(--secondary-color);
  border-radius: 8px;
  font-size: 1rem;
  resize: vertical;
}

.personality-card {
  background-color: var(--card-background);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.personality-card h2 {
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.hidden {
  display: none !important;
}

.mode-selector {
  margin-bottom: 2rem;
  width: 100%;
}

select {
  width: 100%;
  padding: 1rem;
  border: 2px solid var(--secondary-color);
  border-radius: 8px;
  font-size: 1rem;
  background-color: var(--card-background);
  color: var(--text-color);
  cursor: pointer;
}

select:focus {
  outline: none;
  border-color: var(--primary-color);
}

.mode-content {
  display: none;
}

.mode-content.active {
  display: block;
}

.tone-select {
  margin: 1rem 0;
  padding: 0.8rem;
  border: 2px solid var(--secondary-color);
  border-radius: 8px;
  font-size: 1rem;
  background-color: var(--card-background);
  color: var(--text-color);
  cursor: pointer;
}

.tone-select:focus {
  outline: none;
  border-color: var(--primary-color);
}

/* Loading Spinner */
.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.spinner {
  width: 50px;
  height: 50px;
  animation: rotate 2s linear infinite;
}

.spinner .path {
  stroke: var(--primary-color);
  stroke-linecap: round;
  animation: dash 1.5s ease-in-out infinite;
}

@keyframes rotate {
  100% {
    transform: rotate(360deg);
  }
}

@keyframes dash {
  0% {
    stroke-dasharray: 1, 150;
    stroke-dashoffset: 0;
  }
  50% {
    stroke-dasharray: 90, 150;
    stroke-dashoffset: -35;
  }
  100% {
    stroke-dasharray: 90, 150;
    stroke-dashoffset: -124;
  }
}

@media (max-width: 600px) {
  .container {
    padding: 1rem;
  }
  
  .btn {
    padding: 0.8rem 1.5rem;
  }
  
  textarea {
    height: 80px;
  }
}